package com.spyx.user.api;

import com.atyx.spyx.vo.user.LeaderAddressVo;
import com.spyx.user.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "提货点查看")
@RequestMapping("/api/user/leader")
public class LeaderAddressVoController {
    @Autowired
    private UserService userService;

    //根据用户id,查看团长及其提货点
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getLeaderAddressVoById(@PathVariable("userId")Long userId){
        return userService.getLeaderAddressByUserId(userId);
    }
}
